﻿<%@ page language="java" pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/core/common/taglibs.jsp" %>
<%@ include file="/WEB-INF/core/common/top.jsp" %>
<script language="javascript">
   function addNewPramDataItem(){
      location.href="${ctx}/system/rescOpt.action?act=addInput&pageState=add";
   }
   
   function editResc(rescId){
      location.href="${ctx}/system/rescOpt.action?act=editInput&resc.id="+rescId+"&pageState=edit";
   }
   
   function deleteResc(rescId){
      if (confirm('<s:text name="message.delete.confirm" />'))
      	location.href="${ctx}/system/rescOpt.action?act=delete&resc.id="+rescId;
   }
   
   function searchForm(){
   	var name = document.getElementById("q_name").value;
   	var url = "${ctx}/system/rescSearch.action?busiId=searchResc";
   	var options = {"q_name":name};
    submit_ajax(url,options);
   	//submit_ajax(url,'mainframe');
   }
   function sort(_fieldName){
   		document.searchForm.sortField.value=_fieldName;
   		document.searchForm.sortMode.value='<s:property value="sortMode"/>';
   		document.searchForm.submit();
   		/**
   		var name = document.getElementById("q_name").value;
   		var url = "${ctx}/system/rescSearch.action?busiId=searchResc";
   		var options = {"q_name":name,"sortField":fieldName,"sortMode":'<s:property value="sortMode"/>'};
   	 	submit_ajax(url,options);*/
   }
</script>
<body style="overflow-x:hidden;overflow-y:auto;">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<%@include file="/WEB-INF/core/common/message.jsp"  %>
  <tr><td><table border="0" align="center" cellpadding="0" cellspacing="0">
    <td width="8" height="27"><img src="${ctx}/core/images/button_05.gif" width="8" height="27" /></td>
    <td width="99%" align="left" background="${ctx}/core/images/button_06.gif" class="bluecu">&nbsp;<img src="${ctx}/core/images/icon_04.gif" />&nbsp;<s:text name="resc.manager"/></td>
    <td width="8"><img src="${ctx}/core/images/button_07.gif" width="8" height="27" /></td>
    </table>
    </td>
  </tr>
  
  <tr>
    <td colspan="3" class="biaoge">	
     
	     <table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
        <td height="10"></td>
      </tr>  
	  <tr>
		<!-- 查询条件 -->
	    <td class="tabulation" colspan="3"><div style="position:relative">
	      <div id="menu1"><img src="${ctx}/core/images/icon_13.gif"><s:text name="info.queryCondition" /></div>
	      <form name="searchForm" method="post"  action="${ctx}/system/rescSearch.action">
	        <table width="100%" border="0" cellpadding="0" cellspacing="1" bordercolor="#FFFFFF">
	        	
		        	<input type="hidden" name="act" value="query"/>
					<input type="hidden" name="busiId" value="searchResc"/>
					<input type="hidden" name="sortField"/>
					<input type="hidden" name="sortMode"/>
			        <tr align="left">
				        <td width="3%" bgcolor="#DDE4EA" nowrap="nowrap">&nbsp;&nbsp;<s:text name="parmData.name" /></td>
				        <td width="27%" bgcolor="#DDE4EA">
				            <exts:textfield id="q_name" name="q_name" value="%{q_name}" class="textbox_css" style="width:150px"/>
				        </td>
				    </tr>  
    		        <tr>
			        	<td height="20" colspan="2" align="right" bgcolor="#DDE4EA">
						   <input type="submit" class="btn" name="quary" value="<s:text name='log.manage.query' />" />
				        </td>
			        </tr>		       
		       
			</table> </form></div></td>
	<!-- 查询条件结束 -->

  </tr>
  <tr>
    <td height="5"></td>
  </tr>
  <tr>
    <td height="10" background="${ctx}/core/images/line5.gif"></td>
    </tr>
  <tr>
    <td height="5"></td>
  </tr>
	          <tr>
	              <td height="25" align="left" valign="top">
	               
					    <input name="button" type="button" class="btn" onclick="addNewPramDataItem();" value="<s:text name='resc.add' />"/>			  
			    </td>
	          </tr>
	      </table>
        <!--增加-->
      <table id="content" width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#A6A6A6">
        <tr bgcolor="#C7D6EA">
          <td width="40" height="20" align="center" class="table_head"><s:text name="resc.id" /></td>
          <td align="center" class="table_head" ><a href="javascript:sort('NAME')"><s:text name="resc.name" /></a><s:if test="sortField=='NAME'"><s:if test="sortMode=='asc'"><font color="red">↑</font></s:if><s:else><font color="red">↓</font></s:else></s:if></td>
          <td align="center" class="table_head"><s:text name="resc.resstring" /></td>
          <td width="60" align="center" class="table_head"><s:text name="resc.status" /></td>
          <td width="60" align="center" class="table_head"><s:text name="resc.ordernum" /></td>
          <td width="70" align="center" class="table_head"><s:text name="info.operate" /></td>
        </tr>
 		<s:iterator value="pageInfo.searchResult" id="it" status="st">
	        <tr>
	          <td height="20" align="center"><s:property value="%{(pageInfo.currentPageNo-1)*pageInfo.pageSize+#st.index+1}" /></td>
	          <td align="center"><exts:property value="1"/></td>
	          <td align="center"><exts:property value="3"/></td>
	          <td align="center"><s:if test="#it[4]=='valid'"><s:text name="resc.valid" /></s:if><s:else><s:text name="resc.invalid" /></s:else></td>
	          <td align="center"><exts:property value="2"/></td>
	          <td align="center">
	          	<table width="50" height="16" border="0" cellpadding="0" cellspacing="0">
	                <tr>
		                <td width="22" align="right"><a href="javascript:editResc(<exts:property value='0'/>)"><img src="${ctx}/core/images/edit.gif" name="icon_064" width="16" height="16" border="0" id="icon_064" style="CURSOR: hand" title="<s:text name='button.edit' />"/></a></td>
		                <td width="22" align="right"><a href="javascript:deleteResc(<exts:property value='0'/>)"><img src="${ctx}/core/images/del.gif" name="icon_074" width="16" height="16" border="0" id="icon_074" style="CURSOR: hand" title="<s:text name='button.delete' />"/></a></td>
	                </tr>
	          	</table>
	          </td>
	        </tr>
	    </s:iterator>
	    
      </table>
      
      <!-- 分页 -->	  
		  <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr><td>${pagination}</td></tr>
          </table>
          
      <!-- 分页结束 -->	
    </td></tr></table>
</body>

<script>
	tables('content',null);
</script>